import { createRouter, createWebHashHistory } from 'vue-router'
import CesiumContainer from '@/views/Cesium/CesiumContainer.vue'
import CesiumInit from '@/views/CesiumInit.vue'
const routes = [
  {
    path: '/',
    name: 'CesiumInit',
    component: CesiumInit,
    children: [{
      path: '',
      component: CesiumContainer
    }, {
      path: 'cesiumclick',
      name: 'CesiumClick',
      component: () => import('@/views/Cesium/CesiumClick.vue')
    }, {
      path: 'cesiumdraw',
      name: 'CesiumDraw',
      component: () => import('@/views/Cesium/CesiumDraw.vue')
    }, {
      path: 'imagelayer',
      name: 'CesiumImageLayer',
      component: () => import('@/views/Cesium/CesiumImageLayer.vue')
    }, {
      path: 'turfBuffer',
      name: 'CesiumTurfBuffer',
      component: () => import('@/views/Cesium/TurfBuffer.vue')
    }]
  },

  {
    path: '/image',
    name: 'image',
    component: () => import('@/views/image.vue')
  },
  {
    path: '/element',
    name: 'element',
    component: () => import('@/views/Element.vue')
  },
  {
    path: '/echart',
    name: 'echart',
    component: () => import('@/views/Echart.vue')
  },
  {
    path: '/parentson',
    name: 'ep',
    component: () => import('@/views/EL-Parent-Son/Parent.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
